42a18e378c1e6c6c0733f52c5ffd502189c4dd3b,src/main/java/com/github/games647/flexiblelogin/ProtectionManager.java,ProtectionManager,protect,#Player#,42
Before Change
Location<World> oldLoc = player.getLocation();
//sometimes players stuck in a wall
Optional<Location<World>> safeLoc = plugin.getGame().getTeleportHelper().getSafeLocation(oldLoc);
if (safeLoc.isPresent()) {
player.setLocation(safeLoc.get());
}
}
}
After Change
Location<World> oldLoc = player.getLocation();
//sometimes players stuck in a wall
plugin.getGame().getTeleportHelper().getSafeLocation(oldLoc).ifPresent(player::setLocation);
}
}